<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>数组join方法</title>
</head>

<body>
  <script>
    // join方法,可以将数组转换成一个字符串
    const arr = ['张三', '李四', '王五']
    console.log(arr.join());   //转换成一个字符串
    console.log(arr.join('  '));
    console.log(arr.join('|'));
  </script>
</body>

</html>